package src.main.StructuralPatterns.Decorator;

public class Client {
    public static void main(String[] args) {
        // 基础咖啡
        Coffee coffee = new BlackCoffee();
        System.out.println(coffee.getDescription() + "，价格：" + coffee.cost());

        // 动态添加牛奶和糖
        coffee = new MilkDecorator(coffee);
        coffee = new SugarDecorator(coffee);
        System.out.println(coffee.getDescription() + "，价格：" + coffee.cost());
    }
}
